<html>
<head><meta charset="utf-8"><title>unsupported nomem nostack · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html">unsupported nomem nostack</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228427225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228427225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Soveu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228427225">(Mar 02 2021 at 15:21)</a>:</h4>
<div class="codehilite"><pre><span></span><code>warning: asm options unsupported in naked functions: `nomem`, `nostack`
</code></pre></div>
<p>why is that?</p>



<a name="228429879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228429879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228429879">(Mar 02 2021 at 15:35)</a>:</h4>
<p>Because they are useless in this context: with a naked function you are writing the entire asm code for the function.</p>



<a name="228431240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228431240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Soveu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228431240">(Mar 02 2021 at 15:43)</a>:</h4>
<p>then maybe they should be mandatory, just for consistency</p>



<a name="228431356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228431356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228431356">(Mar 02 2021 at 15:44)</a>:</h4>
<p>There's no reason you shouldn't be allowed to modify the stack or access memory in a naked function.</p>



<a name="228434082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228434082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Soveu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228434082">(Mar 02 2021 at 15:59)</a>:</h4>
<p>oh, now i get how it is supposed to work - a function with single asm block, thanks</p>



<a name="228439707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228439707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228439707">(Mar 02 2021 at 16:29)</a>:</h4>
<p>nomem seems like it could be useful if the function is inlined, no?</p>



<a name="228439731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228439731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228439731">(Mar 02 2021 at 16:29)</a>:</h4>
<p>naked function can't be inlined</p>



<a name="228439743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/unsupported%20nomem%20nostack/near/228439743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/unsupported.20nomem.20nostack.html#228439743">(Mar 02 2021 at 16:29)</a>:</h4>
<p>oh, nevermind then</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>